import request from '@/config/axios'

// 资源申请详情 VO
export interface SourceApplyDetailVO {
  id: number // 主键
  sourceId: number // 资源id
}

// 资源申请详情 API
export const SourceApplyDetailApi = {
  // 查询资源申请详情分页
  getSourceApplyDetailPage: async (params: any) => {
    return await request.get({ url: `/dr/source-apply-detail/page`, params })
  },

  // 查询资源申请详情详情
  getSourceApplyDetail: async (id: number) => {
    return await request.get({ url: `/dr/source-apply-detail/get?id=` + id })
  },

  // 新增资源申请详情
  createSourceApplyDetail: async (data: SourceApplyDetailVO) => {
    return await request.post({ url: `/dr/source-apply-detail/create`, data })
  },

  // 修改资源申请详情
  updateSourceApplyDetail: async (data: SourceApplyDetailVO) => {
    return await request.put({ url: `/dr/source-apply-detail/update`, data })
  },

  // 删除资源申请详情
  deleteSourceApplyDetail: async (id: number) => {
    return await request.delete({ url: `/dr/source-apply-detail/delete?id=` + id })
  },

  // 导出资源申请详情 Excel
  exportSourceApplyDetail: async (params) => {
    return await request.download({ url: `/dr/source-apply-detail/export-excel`, params })
  },
}